Integrand size = 25, antiderivative size = 208 \[ \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx=\frac {B x}{c}-\frac {\left (b B-A c-\frac {b^2 B-A b c-2 a B c}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{3/2} \sqrt {b-\sqrt {b^2-4 a c}}}-\frac {\left (b B-A c+\frac {b^2 B-A b c-2 a B c}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{3/2} \sqrt {b+\sqrt {b^2-4 a c}}} \]
B*x/c-1/2*arctan(x*2^(1/2)*c^(1/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2))*(B*b-A*c+ (A*b*c+2*B*a*c-B*b^2)/(-4*a*c+b^2)^(1/2))/c^(3/2)*2^(1/2)/(b-(-4*a*c+b^2)^ (1/2))^(1/2)-1/2*arctan(x*2^(1/2)*c^(1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2))*(B *b-A*c+(-A*b*c-2*B*a*c+B*b^2)/(-4*a*c+b^2)^(1/2))/c^(3/2)*2^(1/2)/(b+(-4*a *c+b^2)^(1/2))^(1/2)
Time = 0.11 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.21 \[ \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx=\frac {B x}{c}-\frac {\left (-b^2 B+A b c+2 a B c+b B \sqrt {b^2-4 a c}-A c \sqrt {b^2-4 a c}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{3/2} \sqrt {b^2-4 a c} \sqrt {b-\sqrt {b^2-4 a c}}}-\frac {\left (b^2 B-A b c-2 a B c+b B \sqrt {b^2-4 a c}-A c \sqrt {b^2-4 a c}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} c^{3/2} \sqrt {b^2-4 a c} \sqrt {b+\sqrt {b^2-4 a c}}} \]
(B*x)/c - ((-(b^2*B) + A*b*c + 2*a*B*c + b*B*Sqrt[b^2 - 4*a*c] - A*c*Sqrt[ b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sq rt[2]*c^(3/2)*Sqrt[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - ((b^2*B - A *b*c - 2*a*B*c + b*B*Sqrt[b^2 - 4*a*c] - A*c*Sqrt[b^2 - 4*a*c])*ArcTan[(Sq rt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(3/2)*Sqrt[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 - 4*a*c]])
Time = 0.42 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.02, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {1602, 1480, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx\) |
\(\Big \downarrow \) 1602 |
\(\displaystyle \frac {B x}{c}-\frac {\int \frac {(b B-A c) x^2+a B}{c x^4+b x^2+a}dx}{c}\) |
\(\Big \downarrow \) 1480 |
\(\displaystyle \frac {B x}{c}-\frac {\frac {1}{2} \left (-\frac {-2 a B c-A b c+b^2 B}{\sqrt {b^2-4 a c}}-A c+b B\right ) \int \frac {1}{c x^2+\frac {1}{2} \left (b-\sqrt {b^2-4 a c}\right )}dx+\frac {1}{2} \left (\frac {-2 a B c-A b c+b^2 B}{\sqrt {b^2-4 a c}}-A c+b B\right ) \int \frac {1}{c x^2+\frac {1}{2} \left (b+\sqrt {b^2-4 a c}\right )}dx}{c}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {B x}{c}-\frac {\frac {\left (-\frac {-2 a B c-A b c+b^2 B}{\sqrt {b^2-4 a c}}-A c+b B\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\left (\frac {-2 a B c-A b c+b^2 B}{\sqrt {b^2-4 a c}}-A c+b B\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}+b}}\right )}{\sqrt {2} \sqrt {c} \sqrt {\sqrt {b^2-4 a c}+b}}}{c}\) |
(B*x)/c - (((b*B - A*c - (b^2*B - A*b*c - 2*a*B*c)/Sqrt[b^2 - 4*a*c])*ArcT an[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt [b - Sqrt[b^2 - 4*a*c]]) + ((b*B - A*c + (b^2*B - A*b*c - 2*a*B*c)/Sqrt[b^ 2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt [2]*Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]))/c
3.2.8.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : > With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q)) Int[1/( b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q)) Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)*((a_) + (b_.)*(x_)^2 + (c_.)*( x_)^4)^(p_), x_Symbol] :> Simp[e*f*(f*x)^(m - 1)*((a + b*x^2 + c*x^4)^(p + 1)/(c*(m + 4*p + 3))), x] - Simp[f^2/(c*(m + 4*p + 3)) Int[(f*x)^(m - 2)* (a + b*x^2 + c*x^4)^p*Simp[a*e*(m - 1) + (b*e*(m + 2*p + 1) - c*d*(m + 4*p + 3))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && NeQ[b^2 - 4*a*c , 0] && GtQ[m, 1] && NeQ[m + 4*p + 3, 0] && IntegerQ[2*p] && (IntegerQ[p] | | IntegerQ[m])
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.07 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.31
method | result | size |
risch | \(\frac {B x}{c}+\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (c \,\textit {\_Z}^{4}+\textit {\_Z}^{2} b +a \right )}{\sum }\frac {\left (\textit {\_R}^{2} \left (A c -B b \right )-B a \right ) \ln \left (x -\textit {\_R} \right )}{2 c \,\textit {\_R}^{3}+\textit {\_R} b}}{2 c}\) | \(65\) |
default | \(\frac {B x}{c}+\frac {\left (A c \sqrt {-4 a c +b^{2}}+A b c -B b \sqrt {-4 a c +b^{2}}+2 B a c -B \,b^{2}\right ) \sqrt {2}\, \arctan \left (\frac {c x \sqrt {2}}{\sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 c \sqrt {-4 a c +b^{2}}\, \sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}-\frac {\left (A c \sqrt {-4 a c +b^{2}}-A b c -B b \sqrt {-4 a c +b^{2}}-2 B a c +B \,b^{2}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {c x \sqrt {2}}{\sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 c \sqrt {-4 a c +b^{2}}\, \sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\) | \(212\) |
Leaf count of result is larger than twice the leaf count of optimal. 2632 vs. \(2 (172) = 344\).
Time = 0.62 (sec) , antiderivative size = 2632, normalized size of antiderivative = 12.65 \[ \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx=\text {Too large to display} \]
1/2*(sqrt(1/2)*c*sqrt(-(B^2*b^3 + (4*A*B*a + A^2*b)*c^2 - (3*B^2*a*b + 2*A *B*b^2)*c + (b^2*c^3 - 4*a*c^4)*sqrt((B^4*b^4 + A^4*c^4 - 2*(A^2*B^2*a + 2 *A^3*B*b)*c^3 + (B^4*a^2 + 4*A*B^3*a*b + 6*A^2*B^2*b^2)*c^2 - 2*(B^4*a*b^2 + 2*A*B^3*b^3)*c)/(b^2*c^6 - 4*a*c^7)))/(b^2*c^3 - 4*a*c^4))*log(2*(B^4*a *b^2 - A*B^3*b^3 - 3*A^3*B*b*c^2 + A^4*c^3 - (B^4*a^2 + A*B^3*a*b - 3*A^2* B^2*b^2)*c)*x + sqrt(1/2)*(B^3*b^4 - 4*A^2*B*a*c^3 + (4*B^3*a^2 + 8*A*B^2* a*b + A^2*B*b^2)*c^2 - (5*B^3*a*b^2 + 2*A*B^2*b^3)*c - (B*b^3*c^3 + 8*A*a* c^5 - 2*(2*B*a*b + A*b^2)*c^4)*sqrt((B^4*b^4 + A^4*c^4 - 2*(A^2*B^2*a + 2* A^3*B*b)*c^3 + (B^4*a^2 + 4*A*B^3*a*b + 6*A^2*B^2*b^2)*c^2 - 2*(B^4*a*b^2 + 2*A*B^3*b^3)*c)/(b^2*c^6 - 4*a*c^7)))*sqrt(-(B^2*b^3 + (4*A*B*a + A^2*b) *c^2 - (3*B^2*a*b + 2*A*B*b^2)*c + (b^2*c^3 - 4*a*c^4)*sqrt((B^4*b^4 + A^4 *c^4 - 2*(A^2*B^2*a + 2*A^3*B*b)*c^3 + (B^4*a^2 + 4*A*B^3*a*b + 6*A^2*B^2* b^2)*c^2 - 2*(B^4*a*b^2 + 2*A*B^3*b^3)*c)/(b^2*c^6 - 4*a*c^7)))/(b^2*c^3 - 4*a*c^4))) - sqrt(1/2)*c*sqrt(-(B^2*b^3 + (4*A*B*a + A^2*b)*c^2 - (3*B^2* a*b + 2*A*B*b^2)*c + (b^2*c^3 - 4*a*c^4)*sqrt((B^4*b^4 + A^4*c^4 - 2*(A^2* B^2*a + 2*A^3*B*b)*c^3 + (B^4*a^2 + 4*A*B^3*a*b + 6*A^2*B^2*b^2)*c^2 - 2*( B^4*a*b^2 + 2*A*B^3*b^3)*c)/(b^2*c^6 - 4*a*c^7)))/(b^2*c^3 - 4*a*c^4))*log (2*(B^4*a*b^2 - A*B^3*b^3 - 3*A^3*B*b*c^2 + A^4*c^3 - (B^4*a^2 + A*B^3*a*b - 3*A^2*B^2*b^2)*c)*x - sqrt(1/2)*(B^3*b^4 - 4*A^2*B*a*c^3 + (4*B^3*a^2 + 8*A*B^2*a*b + A^2*B*b^2)*c^2 - (5*B^3*a*b^2 + 2*A*B^2*b^3)*c - (B*b^3*...
Timed out. \[ \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx=\text {Timed out} \]
\[ \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx=\int { \frac {{\left (B x^{2} + A\right )} x^{2}}{c x^{4} + b x^{2} + a} \,d x } \]
Leaf count of result is larger than twice the leaf count of optimal. 3179 vs. \(2 (172) = 344\).
Time = 0.96 (sec) , antiderivative size = 3179, normalized size of antiderivative = 15.28 \[ \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx=\text {Too large to display} \]
B*x/c + 1/8*((2*b^4*c^3 - 16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(b*c + sqrt(b^2 - 4*a*c) *c)*a*b*c^3 - 2*(b^2 - 4*a*c)*b^3*c^2 + 8*(b^2 - 4*a*c)*a*b*c^3)*B*c^2 - 2 *(sqrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a*b^4*c^2 - 8*sqrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a^2*b^2*c^3 - 2*sqrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c) *c)*a*b^3*c^3 - 2*a*b^4*c^3 + 16*sqrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a ^3*c^4 + 8*sqrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a^2*b*c^4 + sqrt(2)*...
Time = 8.23 (sec) , antiderivative size = 6366, normalized size of antiderivative = 30.61 \[ \int \frac {x^2 \left (A+B x^2\right )}{a+b x^2+c x^4} \, dx=\text {Too large to display} \]
(B*x)/c - atan(((((16*B*a^2*c^3 - 4*B*a*b^2*c^2)/c - (2*x*(4*b^3*c^3 - 16* a*b*c^4)*(-(B^2*b^5 + A^2*b^3*c^2 - A^2*c^2*(-(4*a*c - b^2)^3)^(1/2) - B^2 *b^2*(-(4*a*c - b^2)^3)^(1/2) - 2*A*B*b^4*c - 16*A*B*a^2*c^3 - 4*A^2*a*b*c ^3 - 7*B^2*a*b^3*c + B^2*a*c*(-(4*a*c - b^2)^3)^(1/2) + 12*B^2*a^2*b*c^2 + 2*A*B*b*c*(-(4*a*c - b^2)^3)^(1/2) + 12*A*B*a*b^2*c^2)/(8*(16*a^2*c^5 + b ^4*c^3 - 8*a*b^2*c^4)))^(1/2))/c)*(-(B^2*b^5 + A^2*b^3*c^2 - A^2*c^2*(-(4* a*c - b^2)^3)^(1/2) - B^2*b^2*(-(4*a*c - b^2)^3)^(1/2) - 2*A*B*b^4*c - 16* A*B*a^2*c^3 - 4*A^2*a*b*c^3 - 7*B^2*a*b^3*c + B^2*a*c*(-(4*a*c - b^2)^3)^( 1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